Previous Book Contents Book Index Next

Inside Macintosh: Programming With JManager /
Chapter 2 - JManager Reference / Application-Defined Functions
/


MyAuthenticate

Handles an authentication request for a URL. This is how you would define your authentication function if you were to name it MyAuthenticate:

Boolean MyAuthenticate (
                     JMSessionRef session, 
                     const char* url, 
                     const char* realm, 
                     char userName[255], 
                     char password[255]);
session
The session to receive the text input.
url
The URL making the authentication request.
realm
The realm associated with the URL.
userName
The name entered by the user.
password
The password entered by the user.
function result
A Boolean value. You should return false if the user selects to cancel the authentication, true otherwise.
DISCUSSION
When invoking the Java runtime environment using JMOpenSession, you can designate a callback function to handle any authentication requests from a URL. This callback should prompt the user for a name and password, and pass them back to the session. If you do not indicate an authentication callback, the Java session will prompt the user with its own authentication dialog box.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
10 DEC 1997